package com.liuhaoqi.raletiveblog.mapper;

import com.liuhaoqi.raletiveblog.entity.Test;
import com.liuhaoqi.raletiveblog.result.business.PageResult.TestPageResult;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface TestMapper {
    int deleteByPrimaryKey(Integer commentid);

    int insert(Test record);

    int insertSelective(Test record);

    Test selectByPrimaryKey(Integer commentid);

    int updateByPrimaryKeySelective(Test record);

    int updateByPrimaryKey(Test record);

    List<TestPageResult> findByParentIdNull(@Param("blogid") int blogid,
                                            @Param("parentcommentid") int parentcommentid,
                                            @Param("begin") int begin,
                                            @Param("end") int end,
                                            @Param("pagesize") int pagesize);

    List<TestPageResult> findByParentIdNotNull(@Param("commentid") int commentid,
                                               @Param("begin") int begin,
                                               @Param("end") int end,
                                               @Param("pagesize") int pagesize);

    List<TestPageResult> findByReplayId(@Param("childId") int childId,
                                        @Param("begin") int begin,
                                        @Param("end") int end,
                                        @Param("pagesize") int pagesize);
}